/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package HangHoa;

import java.util.ArrayList;

/**
 *
 * @author Tuan
 */
public class ListQuan {
    private ArrayList<Quan> listQuan;

    public ListQuan() {
        listQuan = new ArrayList<Quan>();
    }
 //Method
    public void ThemQuan(Quan quan){
        listQuan.add(quan);
    }
    public void XoaQuan(Quan quan){
        listQuan.remove(quan);
    }
 //
    public Quan getQuan(int soTT){
        if ((soTT<0)|| soTT>listQuan.size()) return null;
        return listQuan.get(soTT);
    }
    public int Count(){
        return listQuan.size();
    }
}